<template>
  <div class="empty">
    <div>
      <img :style="{'width': width}" class="img" :src="imageSrc" alt="">
    </div>
    <div class="description">{{description}}</div>
    <slot></slot>
  </div>
</template>

<script>
export default {
  name: 'XmEmpty',
  props: {
    description: {
      type: String,
      default: '暂无数据'
    },
    width: {
      type: String,
      default: '160px'
    },
    imageSrc: {
      type: String,
      default: '/img/bg/empty.svg'
    }
  },
  data() {
    return {

    };
  },
};
</script>
<style lang="scss" scoped>
.empty {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  box-sizing: border-box;
  padding: 40px 0;
  .description {
    margin-top: 10px;
    color: #999;
  }
}
</style>